import request from "../../request.js"
//1生成前台确认订单
function addPreOrder(data){
	return request({
		url:"/lejuClient/order/addPreOrder",
		data:data,
		method:"post"
	})
}
//2查询详细的订单列表
function getPreOrderById(orderId,data){
	return request({
		url:`/lejuClient/order/getPreOrderById/${orderId}`,
		data:data
	})
}
//查询订单列表
function findAllOrders(data){
	return request({
		url:"/lejuClient/order/findAllOrders",
		data:data
	})
}
//3提交确认订单
function addConfirmOrder(data){
	return request({
		url:"/lejuClient/order/addConfirmOrder",
		data:data,
		method:"post"
	})
}
//4确认付款
function payConfirm(data){
	return request({
		url:"/lejuClient/order/payConfirm",
		data:data,
		method:"post"
	})
}
//5确认收货
function receiveDone(data){
	return request({
		url:"/lejuClient/order/receiveDone",
		data:data,
		method:"post"
	})
}
//6删除订单
function deleteOrder(orderId,data){
	return request({
		url:`/lejuClient/order/deleteOrder/${orderId}`,
		data:data
	})
}
//取消订单
function cancelOrder(orderId,data){
	return request({
		url:`/lejuClient/order/cancelOrder/${orderId}`,
		data:data,
		method:"post"
	})
}
export{
	addPreOrder,getPreOrderById,findAllOrders,addConfirmOrder,payConfirm,receiveDone,deleteOrder,cancelOrder
}
